package replication;

import java.io.IOException;
import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;


import context.ContextManager;
import context.HostProvider;

import javolution.util.FastList;
import beans.Incident;
import beans.Information;
import beans.Notification;
import beans.Position;

public class MainTest {

	public static Logger log = Logger.getLogger("log_file");
	 FileHandler hand;

	public MainTest() {
		// TODO Auto-generated constructor stub
		
		try {
			hand = new FileHandler("MonLog.txt");
			log.addHandler(hand);
			SimpleFormatter formatter=new SimpleFormatter();
			hand.setFormatter(formatter);
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		test2();
	}

	void test2(){
		ContextManager m=new ContextManager();
		ReplicationReceiver repr=new ReplicationReceiver(m);
		repr.start();
		
		m.run();
	}
		
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new MainTest();
	}
}
